<div>
<?php if($sf_flash->has('success')): ?>
    <?php echo __($sf_flash->get('success')); ?>
<?php endif; ?>

    <?php if( $sf_request->hasErrors() ): ?>
        <span style="color: #FF0000"><?php echo __('The form is not valid because it contains some errors.') ?></span><br /><br />
    <?php endif; ?>

    <?php echo form_tag('forms/send?id='.$tree); ?>
<?php //echo input_hidden_tag('tree', $tree);?>
        <table border="0">
        <?php if( $sf_request->hasError('name') ): ?>
            <tr>
                <td>&nbsp;</td>
                <td><span style="color: #FF0000"><?php echo $sf_request->getError('name') ?></span></td>
            </tr>
        <?php endif; ?>

        <tr>
            <td align="right"><?php echo __('Name'); ?>:</td>
            <td align="left"><?php echo input_tag('name', $sf_params->get('name'), array('class' => 'login_input')); ?></td>
        </tr>
        <tr>
            <td align="right"><?php echo __('Phone No.'); ?>:</td>
            <td align="left"><?php echo input_tag('phone', $sf_params->get('phone'), array('class' => 'login_input')); ?></td>
        </tr>

        <?php if( $sf_request->hasError('mail') ): ?>
            <tr>
                <td>&nbsp;</td>
                <td><span style="color: #FF0000"><?php echo $sf_request->getError('mail') ?></span></td>
            </tr>
        <?php endif; ?>

        <tr>
            <td align="right"><?php echo __('E-mail'); ?>:</td>
            <td align="left"><?php echo input_tag('mail', $sf_params->get('mail'), array('class' => 'login_input')); ?></td>
        </tr>

        <tr>
        <?php if( $sf_request->hasError('message') ): ?>
            <tr>
                <td>&nbsp;</td>
                <td><span style="color: red"><?php echo $sf_request->getError('message')?></span></td>
            </tr>
        <?php endif; ?>

            <td align="right" valign="top"><?php echo __('Message'); ?>:</td>
            <td align="left"><?php echo textarea_tag('message', $sf_params->get('message'), 'size=30x10 class=textarea'); ?></td>
        </tr>

        <tr>
        <?php if( $sf_request->hasError('captcha') ): ?>
            <tr>
                <td>&nbsp;</td>
                <td><span style="color: red"><?php echo $sf_request->getError('captcha')?></span></td>
            </tr>
        <?php endif; ?>

            <td align="right" valign="top"><?php echo __('Security code'); ?>:</td>
            <td align="left" valign="top"><img src="<?php echo url_for('sfCaptcha/index'); ?>" alt="captcha" />
            <?php echo input_tag(
                            'captcha'
                            , ''
                            , array(
                                'class' => 'login_input'
                                , 'style' => 'vertical-align: text-bottom; width: 100px;'
                            )) ?>
            </td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <td><?php echo submit_tag(__('Send'), array('class' => 'login_submit')); ?></td>
        </tr>

        </table>

    </form>

</div>

